package com.cheetah.start.module.view.controller;

import com.cheetah.start.common.base.result.ResultController;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.core.handle.Context;
import org.noear.solon.core.handle.ModelAndView;

/**
 * 视图控制器
 *
 * @author xjh
 * @date 2022/06/18
 */
@Controller
public class ViewController extends ResultController {

    @Mapping()
    public ModelAndView no(){
        return jumpPage("login.html");
    }

    @Mapping("/")
    public void index(Context ctx) {
        ctx.forward("/login");
    }

    @Mapping("/login")
    public ModelAndView login() {
        return jumpPage("login.html");
    }

    @Mapping("/log")
    public ModelAndView log() {
        return jumpPage("log/list.html");
    }

    @Mapping("/index")
    public ModelAndView index() {
        return jumpPage("index.html");
    }

}
